# vim: set ts=8 sts=2 tw=99 et ft=python: 
import os, sys

builder.DetectCompilers()

argv = [
  sys.executable,
  os.path.join(builder.sourcePath, 'generate_header.py'),
  os.path.join(builder.buildPath, 'output.h')
]

outputs = [
  os.path.join(builder.buildFolder, 'output.h')
]

sources = [
  os.path.join(builder.sourcePath, 'activate.txt'),
  argv[1]
]
cmd_node, (output_header,) = builder.AddCommand(
  inputs = sources,
  argv = argv,
  outputs = outputs
)

program = builder.compiler.Library("hello")
program.compiler.includes += [builder.buildPath]
program.compiler.sourcedeps += [output_header]
program.sources = [
  'main.cpp'
]
builder.Add(program)
